Skip to content

fix(web-ui): hide internal gateway tools from selectors - #1588

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:fix-1564
Jul 16, 2026
Merged

fix(web-ui): hide internal gateway tools from selectors#1588
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:fix-1564

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Hide the internal gateway tools GetToolSpec and CallDeferredTool from user-facing tool selection surfaces.

This change:

  • Adds a shared predicate for identifying user-selectable tools.
  • Filters gateway tools from the Agent Scene tool display, counts, and agent-card editor.
  • Filters gateway tools from Assistant Defaults built-in and MCP tool lists.
  • Filters gateway tools from the custom agent create/edit tool selector.
  • Adds defensive checks to prevent hidden gateway tools from being toggled through UI handlers.
  • Preserves gateway tools already present in stored configurations when users edit other tool selections.
  • Adds focused unit coverage for the visibility rule.

Fixes #1564

Type and Areas

Type:

Bug fix / UI/UX / test

Areas:

Web UI, Agent Scene, Assistant Defaults

Motivation / Impact

GetToolSpec and CallDeferredTool are internal gateway tools used by the deferred-tool mechanism. When users add them to an agentic mode's added_tools, they may be returned by the tool registry and exposed in user-facing tool selectors.

Users should not select or manage these internal gateway tools directly. They are now hidden from the relevant Web UI surfaces and excluded from displayed tool counts.

Existing configurations containing these tools are preserved when users modify other tools, so this UI protection does not unexpectedly rewrite or remove legacy configuration entries.

Verification

  • pnpm run type-check:web
    • Passed.
  • pnpm run lint:web
    • Passed with no errors.
    • Reported 12 pre-existing warnings in unrelated files.
  • pnpm --dir src/web-ui run test:run src/shared/utils/toolVisibility.test.ts
    • Passed: 1 test file, 3 tests.
  • pnpm --dir src/web-ui exec vitest run src/app/scenes/agents/AgentsScene.test.tsx --testTimeout=30000
    • Passed: 1 test file, 2 tests.
  • git diff --check
    • Passed.

Reviewer Notes

  • This is a presentation and interaction guard; it does not change backend tool registration or provider request assembly.
  • Stored GetToolSpec and CallDeferredTool entries are intentionally preserved when another tool is toggled or an agent-card tool configuration is saved.
  • No new user-facing strings or locale resources were introduced.
  • The same shared visibility rule is applied to the agent-card editor, Assistant Defaults, and custom agent create/edit selector to prevent the tools from reappearing through another selection surface.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

Hide GetToolSpec and CallDeferredTool from agent and assistant tool
selection surfaces while preserving existing configured gateway entries.

Add shared tool visibility filtering and focused unit coverage.
@wsp1911
wsp1911 merged commit b802094 into GCWing:main Jul 16, 2026
5 checks passed
@wsp1911
wsp1911 deleted the fix-1564 branch July 23, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: resolve_tool_manifest_policy produces duplicate GetToolSpec causing Tool names must be unique API error

1 participant